package com.vay.de.dang.online.view;

import android.content.Context;

import com.vay.de.dang.online.R;

public class DialogOk extends DialogBase {

    private DialogCallback mCallback;

    public DialogOk(Context context) {
        super(context);
        setContentView(R.layout.dialog_ok);
        autoWidth(0.88f);
        setCancelable(false);
        setCanceledOnTouchOutside(false);

        findViewById(R.id.bnt_ok).setOnClickListener(v -> {
            dismiss();
            if (mCallback != null) mCallback.onConfirm();
        });
    }

    public void showOk(DialogCallback callback) {
        mCallback = callback;
        show();
    }
}
